package com.itheima03.day13;

import java.io.*;

/**
 * @author 刘全
 * @date 2021/8/4
 */
public class Test6 {
    public static void main(String[] args) throws IOException {
        InputStreamReader isr = new InputStreamReader(new FileInputStream("D:\\stu.txt"), "GBK");
        OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream("D:\\stu.txt"), "GBK");
        int s;
        char[] chars = new char[1024];
        while ((s = isr.read(chars)) != -1) {
            isr.close();
            osw.write(chars,0,s);
        }
        osw.close();
    }
}
